import config from "@/config"
import http from "@/utils/request"

export default {
  getBrand: {
    url: `${config.API_URL}/cms/brand/list`,
    name: "获取brand列表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  brandDetail: {
    url: `${config.API_URL}/cms/brand/info/`,
    name: "获取产品详情",
    get: async function(params){
      return await http.get(this.url+params)
    }
  },
  brandUpload: {
    url: `${config.API_URL}/cms/brand/save`,
    name: "上传产品",
    post: async function(data = {}){
      return await http.post(this.url,data)
    }
  },
  brandCreate: {
    url: `${config.API_URL}/cms/artwork/create`,
    name: "新增产品",
    post: async function(data = {}){
      return await http.post(this.url,data)
    }
  },
  delBrand: {
    url: `${config.API_URL}/cms/brand/account/del/`,
    name: "删除brand",
    delete: async function(params){
      return await http.delete(this.url+params)
    }
  }
}